<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/V_small_order_item_taopiao.js此处编写
 -->
<template>
  <div>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
      :editFormFileds="editFormFields" :editFormOptions="editFormOptions"
      :searchFormFields="searchFormFields" :searchFormFileds="searchFormFields"
      :searchFormOptions="searchFormOptions" :table="table" :extend="extend">
    </view-grid>
  </div>
</template>

<script>
import extend from "@/extension/mall/packageTicketHeader.js";
import ViewGrid from "@/components/basic/viewTP.vue";
var vueParam = {
  components: {
    ViewGrid,
  },
  data() {
    return {
      table: {
        key: "id",
        footer: "Foots",
        cnName: "套票头订单明细表",
        name: "V_small_order_item_taopiao",
        url: "/V_small_order_item_taopiao/",
        sortName: "createDate",
        // paginationSize: 99999999,
        // paginationHide: true,
        exportUrl: 'ParentExport'
      },
      extend: extend,
      editFormFields: {},
      editFormOptions: [],
      searchFormFields: {
        title: "",
        playStartDate: "",
        order_number: "",
        bookingPhone: "",
        createDate: "",
        status: "",
        distributorCode: "",
        external_order_number1: "",
        type: "",
        // supplierCode: "",
        takeTime: "",
      },
      searchFormOptions: [
        [
          { title: "订单号", field: "order_number", type: "like" },
          { title: "商品名称", field: "title", type: "like" },
          { title: "创建时间", field: "createDate", type: "datetime",required: true },
        ],
        [
          { title: "预订手机号", field: "bookingPhone", type: "like" },
          {
            dataKey: "order_shop",
            data: [],
            title: "票状态",
            field: "status",
            type: "select",
          },
          {
            dataKey: "distributorList",
            data: [],
            title: "分销商名称",
            field: "distributorCode",
            type: "select",
          },
        ],
        [
          { title: "游玩时间", field: "playStartDate", type: "datetime",required: true },
          { title: "退款时间", field: "refundOfTime", type: "datetime",required: true },
          { title: "退款原因", field: "spare4", type: "like" },
        ],
        [
          {
            title: "外部订单号",
            field: "external_order_number1",
            type: "like",
          },
          // {
          //   dataKey: "mall_supplier",
          //   data: [],
          //   title: "供应商名称",
          //   field: "supplierCode",
          //   type: "select",
          // },
          { title: "票状态时间", field: "takeTime", type: "datetime",required: true},
        ],
      ],
      columns: [
        {
          field: "order_number",
          title: "订单号",
          type: "string",
          width: 220,
          align: "left",
        },
        {
          field: "ticketsCode",
          title: "取票码",
          type: "string",
          width: 120,
          align: "left",
        },
        {
          field: "createDate",
          title: "创建时间",
          type: "datetime",
          width: 200,
          align: "left",
          sortable: true,
        },
        {
          field: "title",
          title: "商品名称",
          type: "string",
          width: 200,
          align: "left",
        },
        {
          field: "type",
          title: "产品类型",
          type: "string",
          width: 120,
          require: true,
          align: "left",
          show: true,
        },
        {
          field: "childrenNumber",
          title: "订单子项单号",
          type: "string",
          width: 220,
          align: "left",
        },
        {
          field: "pmsconfirmationNo",
          title: "PMS确认号",
          type: "string",
          width: 120,
          align: "left",
        },
        {
          field: "bookingName",
          title: "预订人姓名",
          type: "string",
          width: 120,
          align: "left",
          sortable: true,
        },
        {
          field: "bookingPhone",
          title: "预订手机号",
          type: "string",
          width: 160,
          align: "left",
        },
        {
          field: "name",
          title: "姓名",
          type: "string",
          width: 120,
          align: "left",
        },
        {
          field: "phone",
          title: "电话",
          type: "string",
          width: 160,
          align: "left",
        },
        {
          field: "settlement_price",
          title: "单价",
          type: "decimal",
          width: 90,
          align: "left",
        },
        {
          field: "num",
          title: "购买数量",
          type: "int",
          width: 80,
          align: "left",
        },
        {
          field: "settlement_total_fee",
          title: "合计金额",
          type: "decimal",
          width: 160,
          align: "left",
        },
        {
          field: "playStartDate",
          title: "游玩开始时间",
          type: "datetime",
          width: 200,
          align: "left",
          sortable: true,
        },
        {
          field: "playEndDate",
          title: "游玩结束时间",
          type: "datetime",
          width: 200,
          align: "left",
          sortable: true,
        },
        {
          field: "external_order_number1",
          title: "外部订单号",
          type: "string",
          width: 220,
          align: "left",
        },
        {
          field: "refundOfTime",
          title: "退款申请时间",
          type: "datetime",
          width: 220,
          align: "left",
          sortable: true,
        },
        {
          field: "refundTime",
          title: "退款时间",
          type: "datetime",
          width: 200,
          align: "left",
          sortable: true,
        },
        {
          field: "takeTime",
          title: "使用时间",
          type: "string",
          width: 200,
          align: "left",
        },
        {
          field: "id",
          title: "主键",
          type: "string",
          width: 20,
          hidden: true,
          require: true,
          align: "left",
        },
        {
          field: "status",
          title: "票状态",
          type: "bigint",
          bind: { key: "order_shop", data: [] },
          width: 90,
          align: "left",
        },
        // {
        //   field: "supplierCode",
        //   title: "供应商名称",
        //   type: "string",
        //   bind: { key: "mall_supplier", data: [] },
        //   width: 120,
        //   align: "left",
        // },
        {
          field: "distributorCode",
          title: "分销商名称",
          type: "string",
          bind: { key: "distributor_name", data: [] },
          width: 220,
          align: "left",
        },
      ],
      detail: {
        cnName: "#detailCnName",
        columns: [],
        sortName: "",
        key: "",
      },
    };
  },
};
export default vueParam;
</script>
